var app = getApp()
var fileData = require('../../utils/data.js')
var req = require('../../utils/reqUtils.js');
Page( {
  data: {
    colors : fileData.getColor(0),
  },
  onLoad: function (options) { 
    wx.setNavigationBarColor({
      frontColor: '#ffffff', // 必写项【该字体颜色仅支持 #ffffff 和 #000000 】
      backgroundColor: this.data.colors.topColor, // 传递的颜色值【仅支持有效值为十六进制颜色】
    })
    req.get('/saleServiceShop/getOneSaleServiceShop.do', {"shopId":options.shopId}, 1)
    .then(res => {
      this.setData({
       shopDetail:res.data
      })
    })
    req.get('/saleServiceShop/getCars.do', {"shopId":options.shopId}, 1)
    .then(res => {
      this.setData({
       cars:res.data
      })
    })
  },
  // 预定
  bookTap:function(e){
    wx.navigateTo({
      url:'../book/book?carId=' + e.currentTarget.dataset.aid
    })
  }
})